package com.share.innerclass;

/**
 * http://blog.csdn.net/chenssy/article/details/13170015
 * @author Johnny Tam
 *
 */
public class InnerClassDemo3 {

	public void test(Bird bird) {
		System.out.println(bird.getName() + "能够飞 " + bird.fly() + "米");		
		//System.out.println(bird.);
	}
	
	public static void main(String[] args) {
		
		InnerClassDemo3 demo = new InnerClassDemo3();
		//String smallName = "妞妞";
		demo.test(new Bird(){
			@Override
			public int fly() {
				// TODO Auto-generated method stub
				return 1000;
			}
			public String getName() {
				return "大雁";
			}
			
		});
		
	}

}
